From b246f571850419affa459113d462ceae9eadc373 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Fri, 25 Jun 1993 21:30:54 +0000 Subject: [PATCH] (vc-diff): If `diff' gives empty output, return nil. --- lisp/vc.el | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/lisp/vc.el b/lisp/vc.el index ff6b8e2166b..b48e3bf07d4 100644 --- a/lisp/vc.el +++ b/lisp/vc.el @@ -726,8 +726,14 @@ and two version designators specifying which versions to compare." ;; visited. This plays hell with numerous assumptions in ;; the diff.el and compile.el machinery. (pop-to-buffer "*vc*") - (vc-shrink-to-fit) - (goto-char (point-min)) + (pop-to-buffer "*vc*") + (if (= 0 (buffer-size)) + (progn + (setq unchanged t) + (message "No changes to %s since latest version." file)) + (vc-shrink-to-fit) + (goto-char (point-min))) + ) (not unchanged) ) -- 2.30.2